<!DOCTYPE html>
<html>
<head>
    <title>代理商管理员</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group">
                <div style="float: left;margin-left:10px;height:24px;line-height:14px;">代理商状态：</div>
                <div style="float: left;width:70px;margin-right: 10px;">
                    <select class="form-control" v-model="q.status" @keyup.enter="query" >
                        <option value="0">正常</option>
                        <option value="1">禁止</option>
                    </select>
                </div>
                <div class="form-group col-sm-2">
                    <input type="text" class="form-control" v-model="q.adminName" @keyup.enter="query" placeholder="管理员名称">
                </div>
                <div class="form-group col-sm-2">
                    <input type="text" class="form-control" v-model="q.adminPhone" @keyup.enter="query" placeholder="手机号码">
                </div>
                <div class="form-group">
                    <div style="vertical-align: middle;display: table-cell!important;">
                        <div id="agentParentQuery1" style="float: left" class="col-sm-10">
                                <input type="text" class="form-control" v-model="q.adminParent" disabled="disable" placeholder="所属代理商"/>
                            </div>
                            <div class="col-sm-2">
                                <a class="btn btn-primary"  @click="addAdmin">&nbsp;选择</a>
                            </div>
                    </div>
                </div>
                <a class="btn btn-primary" @click="query">查询</a>
            </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>


    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="z-index: 1041" >
            <form class="form-horizontal">
                <div class="modal-content" style="width: 750px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                            <div style="float: left;width:70px;margin-right: 10px;">
                                <select class="form-control" v-model="qcx.status" @keyup.enter="queryAdmin1" id="s_id1">
                                    <option value="0">正常</option>
                                    <option value="1">禁止</option>
                                </select>
                            </div>

                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcx.shopName" @keyup.enter="queryAdmin1" placeholder="请输入内容">
                            </div>
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qcx.shopPhone" @keyup.enter="queryAdmin1" placeholder="请输入内容">
                            </div>

                            <a class="btn btn-primary" @click="queryAdmin1">搜索</a>
                        </div>

                        <table id="jqGridAdd1" style="width: 100%;"></table>
                        <div id="jqGridPager1"></div>
                        <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                    </div>
                </div>
            </form>
        </div>
    </div>

    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
            <div class="col-sm-2 control-label">登录角色</div>
            <div class="col-sm-10" id="adSn">
            <el-select v-model="agentShopAdmin.adminName" placeholder="请选择" @change="setUsername" required="required">
            <el-option
            v-for="item in user"
            :key="item.id"
            :label="item.username"
            :value="item.userId">
            </el-option>
            </el-select>
            </div>
            </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">管理员名称</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="agentShopAdmin.adminName" placeholder="管理员名称"/>-->
                        <!--</div>-->
                    <!--</div>-->
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">管理员手机</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="agentShopAdmin.adminPhone" placeholder="管理员手机"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">所属代理商</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="agentShopAdmin.adminParent" placeholder="所属代理商"/>-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="form-group">
                        <div class="col-sm-2 control-label">所属代理商</div>
                        <div style="vertical-align: middle;display: table-cell!important;">
                            <div id="agentParent" style="float: left" class="col-sm-10">
                                <input type="text" class="form-control" disabled="disable" v-model="agentShopAdmin.adminParent"/>
                            </div>
                            <div class="col-sm-2">
                                <a class="btn btn-primary"  @click="addAgent">&nbsp;选择</a>
                            </div>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">所属业务员</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="agentShopAdmin.adminBusParent" placeholder="所属业务员"/>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">所属业务员</div>-->
                        <!--<div class="col-sm-2" id="adminBusParent">-->
                            <!--<input type="text" class="form-control" id="name" v-model="agentShopAdmin.adminBusParent" placeholder="选择业务员">-->
                        <!--</div>-->
                    <!--</div>-->
            <div class="form-group">
                <div class="col-sm-2 control-label">所属业务员</div>
                <div class="col-sm-10" id="sales">
                    <el-select v-model="agentShopAdmin.adminBusParent" placeholder="请选择" @change="setBusUsername">
                        <el-option
                                v-for="item in agentshopbus"
                                :key="item.id"
                                :label="item.busName"
                                :value="item.id">
                        </el-option>
                    </el-select>
                </div>
            </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">佣金百分比</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="agentShopAdmin.adminRatio" placeholder="佣金百分比"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">可打开所属机柜</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="agentShopAdmin.adminOpen" @keyup.enter="query" >
                                <option value="0">是</option>
                                <option value="1">否</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="agentShopAdmin.status" @keyup.enter="query" >
                                <option value="0">正常</option>
                                <option value="1">禁用</option>
                            </select>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>

                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <form class="form-horizontal">
                            <div class="modal-content" style="width: 750px;">
                                <div style="padding: 15px;">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                        <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                                    </div>
                                </div>
                                <div class="modal-body">
                                    <div style="margin-bottom: 15px">
                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                                        <div style="float: left;width:70px;margin-right: 10px;">
                                            <select class="form-control" v-model="qxz.status" @keyup.enter="queryAdmin" id="s_id">
                                                <option value="0">正常</option>
                                                <option value="1">禁用</option>
                                            </select>
                                        </div>

                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                                        <div style="float: left;width:120px;margin-right: 10px;">
                                            <input type="text" class="form-control" v-model="qxz.shopName" @keyup.enter="queryAdmin" placeholder="请输入内容">
                                        </div>
                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                        <div style="float: left;width:120px;margin-right: 10px;">
                                            <input type="text" class="form-control" v-model="qxz.shopPhone" @keyup.enter="queryAdmin" placeholder="请输入内容">
                                        </div>

                                        <a class="btn btn-primary" @click="queryAdmin">搜索</a>
                                    </div>

                                    <table id="jqGridAdd" style="width: 100%;"></table>
                                    <div id="jqGridPager2"></div>
                                    <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                                </div>
                            </div>
                        </form>
                    </div>
                </div>


            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/agentshopadmin.js?_${.now?long}"></script>
</body>
</html>